﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Jzy.Model.Project;
using Jzy.DAL.Project;
using System.Data;
using Frame.Lib.Core.Base;

namespace Jzy.BLL.Project
{
    public class TaskOverseeBO:CommonOperate<TaskOverseeInfo>
    {
        private TaskOverseeDAL _oversee;
        protected override BaseDAL DAL
        {
            get
            {
                return _oversee;
            }
        }
        public TaskOverseeBO(string taskID)
            : base("PrjTaskOversee")
        {
            _oversee = new TaskOverseeDAL(taskID);
        }

        public override System.Data.DataTable GetDataTable()
        {
            DataTable dt = _oversee.GetDataTable();
            foreach (DataRow dr in dt.Rows)
            {
                dr["Remark"] = ((string)dr["Remark"]).Replace("\r\n", "<br/>");
            }
            return dt;
        }

        public static System.Data.DataTable GetDataTableByPrjID(string PrjID)
        {
            DataTable dt = TaskOverseeDAL.GetDataTableByPrjID(PrjID);
            foreach (DataRow dr in dt.Rows)
            {
                dr["Remark"] = ((string)dr["Remark"]).Replace("\r\b", "<br/>");
            }
            return dt;
        }
    }
}
